﻿@model Tippelde.Web.Models.Group.UsersAssignToGroupModel
@{
    ViewBag.Title = "Csoport felhasználói";
}

<div class="row">
    <div class="col-md-6">
        <h2>@Model.Group.Name</h2>
        @using(Html.BeginForm()){
            @Html.ValidationSummary();
            @Html.AntiForgeryToken();
        <fieldset>
            <ul class="list-group">
                @for(int i = 0; i<Model.Users.Count; i++) {
                <li class="list-group-item">        
                    @Html.Hidden(String.Format("model[{0}].Key", i),Model.Users[i].UserId)                 
                    @Html.CheckBox(String.Format("model[{0}].Value[0]", i), Model.Users[i].IsSelected)        
                    @Html.CheckBox(String.Format("model[{0}].Value[1]", i), Model.Users[i].IsEditor)
                    @Html.Label(Model.Users[i].UserName)
                </li>
                }
            </ul>
        </fieldset>
        <button type="submit" class="btn btn-default">Mentés</button>
        }
    </div>
</div>